package com.wsdc.encryption;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Base64;
import android.util.Log;

public class BaseActivity extends AppCompatActivity {

    private String data = "盗亦有道";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_base);

        byte[] encode = Base64.encode(data.getBytes(), Base64.DEFAULT);

        Log.d("flag", "onCreate: 使用base的编码内容" +new String(encode));

        String str = "5oiR5Lus5Y675ZOq6YeM5ZGA";


        byte[] decode = Base64.decode(str.getBytes(), Base64.DEFAULT);

        Log.d("flag", "onCreate: 解码数据" +new String(decode));
    }
}
